<!doctype html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>商务合作</title>
    <link rel="stylesheet" type="text/css" href="../../css/api.css" />
    <link rel="stylesheet" type="text/css" href="../../css/aui.css" />
    <script src="../../script/vue.min.js"></script>
    <script src="../../script/fastclick.js"></script>
    <style>
        #wrapId {
            height: 100%;
            display: -webkit-box;
            display: -webkit-flex;
            display: flex;
            -webkit-box-orient: vertical;
            -webkit-flex-flow: column;
            flex-flow: column;
        }

        #header {
            background: #fff;
            color: #000;
        }

        #main {
            -webkit-box-flex: 1;
            -webkit-flex: 1;
            flex: 1;
        }

        .question-box {
            position: absolute;
            width: 100%;
            top: 0;
            bottom: 0;
            left: 0;
            background: #f3f3f3;
        }

        .textarea {
            width: 100%;
            padding: 14px;
            height: 160px;

            margin-top: 10px;
            font-size: 13px;
            line-height: 17px;
            color: #646464;
            background: #fff;
            box-sizing: border-box;
            resize: none
        }

        .submit-box {
            padding: 0 26px;
        }
        #question{
        }
        .submit {
            width: 100%;
            height: 43px;
            margin-top: 34px;
            background: -webkit-linear-gradient(to right, #449efb, #0c7aff);
            background: -o-linear-gradient(to right, #449efb, #0c7aff);
            background: -moz-linear-gradient(to right, #449efb, #0c7aff);
            background: linear-gradient(to right, #449efb, #0c7aff);
            text-align: center;
            line-height: 43px;
            font-size: 13px;
            color: #fff;
            border-radius: 22px;
            box-shadow: 0 5px 16px 5px rgba(244, 158, 35, 0.1)
        }
    </style>
</head>

<body>
    <div id="wrapId" v-cloak>
        <div class="question-box">
            <textarea class="textarea" v-model="text" name="" id="question" cols="30" rows="30" placeholder="请描述您遇到的问题" @click="inputClick('question')"></textarea>
            <div class="submit-box">
                <div class="submit" @click="goIndex">提交反馈</div>
            </div>
        </div>
    </div>
</body>
<script src="../../script/api.js"></script>
<script>
    apiready = function() {
        FastClick.attach(document.body);
        var vm = new Vue({
            el: '#wrapId',
            data: {
                text: ''
            },
            methods: {
                goIndex() {
                  if (this.text === '') {
                      $api.confirm('请填入反馈内容')
                  } else {
                    $api.confirm('提交反馈成功')
                  }
                },
                inputClick(id) {
                    $api.byId(id).focus()
                }
            },
            mounted: function() {

            }
        })
    }
</script>

</html>
